package com.fifth.business.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.fifth.common.pojo.dto.CommonResult;
import com.fifth.common.pojo.entity.Appeal;
import com.fifth.common.pojo.entity.BusinessInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * @作者：刘壬杉
 * @创建时间 2022/8/31 11:34
 **/
@Mapper
public interface BusinessMapper extends BaseMapper<BusinessInfo> {
    /**
     * 查询所有信息
     * @param businessInfo
     * @return
     */
    List<BusinessInfo> selectAll(BusinessInfo businessInfo);

    /**
     * 更改店铺
     * @param businessInfo
     * @return
     */
    int updatestore(BusinessInfo businessInfo);

    /*修改头像*/
    int updateperson(BusinessInfo businessInfo);

    int updatepassword(BusinessInfo businessInfo);


    List<BusinessInfo> queryshop();

    /*根据销量前四查询*/
    List<BusinessInfo> fourshop();
    /*根据销量查询全部*/
    List<BusinessInfo> allshop();

    /*查询所有店铺*/
    List<BusinessInfo> selectshop();


    Map numshop();
     /*ip店铺名*/
    List<BusinessInfo> ipshop();

    int updatestate(Integer id);




    List<Map> numberBusiness();

    List<Map> priceBusiness();

    IPage<BusinessInfo> loadlingshop(IPage<BusinessInfo> page, @Param("ew") QueryWrapper<BusinessInfo> wrapper);
}
